'Called when the Plugin should validate the Data the user has entered
SUB Plugin_CheckData(ElementIndex)
END SUB
'Called when the Plugin should apply the changes
SUB Plugin_Apply(ElementIndex,ElementSubIndex)
for l=1 to iCount
s=sP & RegEnumElement(l) & sV2
b=GetUIElementEx(l)
if b=true then
Call RegWriteValue(s,2,1)
else
if RegValueExists(s) then Call RegDeleteValue(s)
end if
next
End Sub
Sub Test123
if ElementSubIndex>0 then 'OK, user has selected an item
If ElementIndex=1 then 'Rename name
s=sp & aryLoc(ElementSubIndex) & sV1
sV=RegReadValue(s)
'DebugMsg ElementSubIndex
'Debugmsg s
sV=InputWindow("Change Name in List",sV,1)
if IsEmpty(sV)=false then
'change it!
Call RegWriteValue(s,sV,1)
Call SetUIElement(ElementSubIndex,sV)
end if
else
if ElementIndex=3 then 'Delete!!
'Create name of first value
t=sp & aryLoc(ElementSubIndex) ' "& sV1" removed here, and 's' renamed to 't'
' Start of new code added by Neil Turner <totalxs@hotmail.com>
iCount=RegEnumValues(t) ' Enumerate all values
For u=1 to iCount
s=RegEnumElement(u) ' Get one of the values...
s=t & "\" & s ' Get full path of value...
Call RegDeleteValue(s) ' ... and delete it!
Next
If IsEmpty(t & "\@")=true then
Call RegDeletePath(t) ' Finally, delete key!
else
If IsEmpty(t & "\@")=true then
Call RegDeleteValue(t & "\@") ' Otherwise, remove (Default) and then delete key. IsEmpty test is carried out twice - otherwise X-Setup produces an error (don't know why).
end if
Call RegDeletePath(t)
end if
' End of new code
'Set item to empty so it is removed from the list...
Call SetUIElement(ElementSubIndex,"")
else 'Edit command
s=sp & aryLoc(ElementSubIndex) & sV2
sV=RegReadValue(s)
sV=InputWindow("Change Uninstall Command",sV,1)
if IsEmpty(sV)=false then
'change it!
Call RegWriteValue(s,sV,1)
end if
end if
end if
else
Call MsgWarning("No item selected - please select an item first.")
end if
END SUB
'Called when the Plugin is about to be removed from memory